package com.aaa.sso.feign;


import com.aaa.entity.BBusinessInfo;
import com.aaa.entity.EEmpInfo;
import com.aaa.entity.UUserInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

// 调用的是哪一个微服务
@FeignClient("sys-system")
public interface UserService {

    //根据用户名获取UUser
    @PostMapping("u-user-info/getUserByName/{username}")
    UUserInfo getByName(@PathVariable String username);
    //根据用户手机号查询用户信息
    @PostMapping("u-user-info/getUserByPhone/{telephone}")
    UUserInfo getByPhone(@PathVariable String telephone);

    // 根据用户名 获取TUser
    @GetMapping("api/emp/{tel}")
    EEmpInfo getByUserName(@PathVariable String tel);

    @GetMapping("api/role/{eid}")
    List<String> findByUid(@PathVariable String eid);


    @PostMapping("e-emp-info/getEmpByPhone/{telephone}")
    EEmpInfo getEmpByPhone(@PathVariable String telephone);
    @PostMapping("b-business-info/getBusinessByPhone/{telephone}")
    BBusinessInfo getBusinessByPhone(@PathVariable String telephone);


}
